package ru.spb.osll.myfit.common;

import java.util.Vector;

import com.google.gwt.user.client.rpc.IsSerializable;

public class Page implements IsSerializable {

	private static final long serialVersionUID = -8642682637800639769L;

	private Vector<PageElement> m_elements = new Vector<PageElement>();

	public Page() {
	}

	public Vector<PageElement> getElements() {
		return m_elements;
	}

	public int countPageElements() {
		return m_elements.size();
	}

	public void deleteElements() {
		m_elements.clear();
	}

	public void insertElement(PageElement element, int index) {
		m_elements.insertElementAt(element, index);
	}
	
	public void insert(PageElement element) {
	    m_elements.add(element);
	}

	public PageElement getElement(int i) {
		return m_elements.get(i);
	}
}
